package com.ridu.project.beshid.repository;


import com.ridu.project.beshid.entity.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

/**
 * Created by Administrator on 2017/3/7.
 */
@Repository
public interface UserRepository extends JpaRepository<UserEntity, Long>,JpaSpecificationExecutor<UserEntity> {
    @Transactional
    UserEntity findByUsername(String beshId);

    UserEntity findOneByUsernameAndCode(String username, String code);

    UserEntity findOneByToken(String token);
}
